{% extends 'ApiCloud/Base/layout.common.html.twig' %}

{% block main %}
    {% include "ApiCloud/Base/inc.head.light.html.twig" with {title:"加油申请",back:1} %}
    <mu-tabs :value.sync="tab" color="amber600" indicator-color="amber600" inverse center>
        <mu-tab>查看记录</mu-tab>
        <mu-tab>发起申请</mu-tab>
    </mu-tabs>
    <div class="pad10" v-if="tab == 1">
        <mu-form ref="form" :model="en"  label-position="top" label-width="100">
            <div class="fs10 padl5 padr5">
                <mu-form-item label="加油类型" :rules="[rules.notNull]" prop="fuelType">
                    <mu-select v-model="en.fuelType" full-width>
                        <mu-option v-for="item,index in types"
                                   :key="item.id" :label="item.name" :value="item.id"></mu-option>
                    </mu-select>
                </mu-form-item>
                <mu-form-item label="车辆" :rules="[rules.notNull]" prop="cid">
                    <mu-select v-model="en.cid" full-width>
                        <mu-option v-for="option,index in cars"
                                   :key="index" :label="option" :value="index"></mu-option>
                    </mu-select>
                </mu-form-item>
                <mu-form-item label="金额" :rules="[rules.isNum]" prop="money">
                    <mu-text-field v-model="en.money"></mu-text-field>
                </mu-form-item>

                <div class="fs8 c11 pad5 mart20">
                    <mu-button large full-width round color="primary" @click="submit()">保存提交</mu-button>
                </div>
            </div>
        </mu-form>
    </div>
    <div class="pad10" v-if="tab == 0">
        <div class="fs8 c11">
            <div class="bc13 padb5 round5 mart5  bdc12" v-for="item in list">
                <div class="flrc padl5 padr5 c11 lh2 padt3 padb3">
                    <div class="">车牌号：</div>
                    <div class="flex1 fs14">[[item.Car_number]]</div>
                    <div class="c2">
                        {#<span class="warning">【待审核】</span>#}
                        {#<span class="green">【已通过】</span>#}
                    </div>
                </div>
                <div class="flrc pad5">
                    <div class="">申请金额：</div>
                    <div class="flex1">[[item.CarFuelLog_money]]</div>
                    <div class="">油料类型：</div>
                    <div class="flex1">[[item.ConfCat_name]]</div>

                </div>
                <div class="bdtso pad5 marl5 marr5 flrc bcf">
                    <div class="">审核日期：</div>
                    <div class="flex1" v-if="item.CarFuelLog_check_Date != null">[[item.CarFuelLog_check_Date ]]</div>
                    <div class="flex1" v-if="item.CarFuelLog_check_Date == null">等待审核</div>
                </div>
                <div class="bdtso pad5 marl5 marr5 flrc bcf">
                    <div class="">审核意见：</div>
                    <div class="flex1" v-if="item.CarFuelLog_check_Text != null">[[item.CarFuelLog_check_Text ]]</div>
                    <div class="flex1" v-if="item.CarFuelLog_check_Text == null">等待审核</div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
